package cn.kxm.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.kxm.pojo.Part;
import cn.kxm.pojo.PartType;

public interface PartMapper {
   public List<Part> getPartList(@Param("part")Part part,@Param("pageNo") Integer pageNo,@Param("size") Integer pageSize);
   
   public int getPartCount(@Param("part")Part part);
   
   public List<PartType> getPartTypeList();
   
   public List<Map<String, Object>> getPartListByBillCode(@Param("billCode") String billCode);
   
   
   
   public List<Map<String, Object>> getPartListByCodes(@Param("codes")String [] codes);
   
   public List<Map<String, Object>> getPartListAndCompanyName(
		@Param("customName")String customName,
   		@Param("currPage")Integer currPage,
   		@Param("size")Integer size,
   		@Param(value="size2")String size2,
   		@Param(value="partNo")String partNo,
   		@Param(value="name")String name,
   		@Param(value="type")Integer type);
   
   public int getPartListCount(
   		@Param(value="size2")String size2,
   		@Param(value="partNo")String partNo,
   		@Param(value="name")String name,
   		@Param(value="type")Integer type);
   
   public List<Map<String, Object>>getByCode(@Param("code")String code);
   
   public List<Map<String, Object>>getPart_ib(@Param("code")String code);
   
   public List<Map<String, Object>> getPartDetailList(@Param("currPage")Integer currPage,
		                                              @Param("size") Integer size,
		                                              @Param("part")Part part,
		                                              @Param("mold")String mold);
   public int getPartDetailListCount(@Param("part")Part part, @Param("mold")String mold);
   
   public int addPart(Part part);
   
   public Part getPartByCode(String code);
   
   public int modifyPartByPart(Part part);
   
   public int delPartByCode(String code);
   public List<Map<String, Object>> getPartMapList(@Param("currPage")Integer currPage,
                                                   @Param("size") Integer size,
		                                           @Param("code")String partCode,
		                                           @Param("customName")String customName,
		                                           @Param("storageStatus")Integer stroageStatus);
   public int getPartMapListCount(
           @Param("code")String partCode,
           @Param("customName")String customName,
           @Param("storageStatus")Integer stroageStatus);
}
